import 'package:flutter/cupertino.dart';
import 'package:flutter_demo/core/api/all_request.dart';
import 'package:flutter_demo/core/model/meal_model.dart';
import 'package:provider/provider.dart';

class MealViewModel extends ChangeNotifier {
  List<MealModel> _meals = [];


  // ignore: unnecessary_getters_setters
  List<MealModel> get meals => _meals;

  // ignore: unnecessary_getters_setters
  set meals(List<MealModel> value) {
    _meals = value;
  }

  MealViewModel() {
    getMealData().then((value) {
      _meals = value;
      notifyListeners();
    });
  }

}
